import request from '@/utils/request'

// 获取文章列表
export function getArticleList(params) {
  return request({
    url: '/articles/list',
    method: 'get',
    params
  })
}

// 获取文章详情
export function getArticleDetail(articleId) {
  return request({
    url: `/articles/detail/${articleId}`,
    method: 'get'
  })
}

// 获取分类列表
export function getCategoryList() {
  return request({
    url: '/articles/categories',
    method: 'get'
  })
}

// 搜索文章
export function searchArticles(keyword, params) {
  return request({
    url: '/articles/search',
    method: 'get',
    params: {
      keyword,
      ...params
    }
  })
} 